#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2018 crane <crane@crane-pc>
#
# Distributed under terms of the MIT license.

"""

"""

from math import *


def next_power_of(x, base=2):
    n = log(x, base)
    next_power = ceil(n)
    # print(next_power)
    return base ** next_power

def main():
    print("start main")

    print( next_power_of(5) )
    print( next_power_of(8) )
    print( next_power_of(9) )

    print( next_power_of(9, 3) )
    print( next_power_of(9, 4) )

if __name__ == "__main__":
    main()
